<include file="Public:header" />
<script type="text/javascript" charset="UTF-8" src="__PUBLIC__/Operation/js/editor/kindeditor-min.js"></script>
<script type="text/javascript">
    window.KindEditor.options.uploadJson = "{:U('Pic/upload_json')}";
    window.KindEditor.options.fileManagerJson = "{:U('Pic/file_manager_json')}";
</script>

<div class="headbar">
	<div class="position"><span>商品</span><span>></span><span>商品分类管理</span><span>></span><span><if condition="$category_id neq null">编辑<else/>添加</if>分类</span></div>
</div>
<div class="content_box">
	<div class="content form_content">
		<form action="{:U('Goods/category_save')}" method="post">
			<input name="id" value="" type="hidden" />
			<table class="form_table" cellpadding="0" cellspacing="0">
				<colgroup>
					<col width="150px" />
					<col />
				</colgroup>

				<tr>
					<th>分类名称：</th>
					<td>
						<input class="normal" name="name" type="text" pattern="required" alt="分类名称不能为空" /><label>* 必选项</label>
					</td>
				</tr>
				<tr>
					<th>上级分类：</th>
					<td>
						<!--分类数据显示-->
						<span id="__categoryBox" style="margin-bottom:8px"></span>
						<button class="btn" type="button" name="_goodsCategoryButton"><span class="add">设置分类</span></button>
						<include file="Public:set_Category" name="parent_id"/>
						<label>如果不选择上级分类，默认为顶级分类</label>
					</td>
				</tr>
				<tr>
					<th>排序：</th><td><input class="normal" name="sort" pattern='int' empty alt='排序必须是一个数字' type="text"/></td>
				</tr>
				<tr>
					<th>SEO标题：</th><td><input class="normal" name="title" type="text" /></td>
				</tr>
				<tr>
					<th>SEO关键词：</th><td><input class="normal" name="keywords" type="text" /></td>
				</tr>
				<tr>
					<th>SEO描述：</th><td><textarea name="descript" cols="" ></textarea></td>
				</tr>
				<tr>
					<td></td><td><button class="submit" type="submit"><span>确 定</span></button></td>
				</tr>
			</table>
		</form>
	</div>
</div>

<script type="text/javascript">
$(function()
{
	var formObj = new Form();
	formObj.init({$json_category});
})
</script>
<include file="Public:footer" />